
/**
 * This class creates a movableShapes panel to put movable shapes into
 * 
 * @author Matthew Edwards 
 * @version 4-9-10
 */

// Homework 11 written by Matthew Edwards
// Collaboration Statement:
// I did not discuss this assignment with anyone.

import java.awt.event.*;
import javax.swing.*;

public class LoginGUI extends JPanel
{
    /**
     * 
     */
    int role= 0;
    
    private static final long serialVersionUID = -7639599828354057466L;
    private final JLabel lblNewLabel = new JLabel("UserId");
    private JTextField textField;
    private JTable table;
    private JTextField textField_1;
    private JComboBox comboBox;
    public LoginGUI() {
        add(lblNewLabel);
        
        textField = new JTextField();
        add(textField);
        textField.setColumns(10);
        
        JLabel lblPassword = new JLabel("Password");
        add(lblPassword);
        
        textField_1 = new JTextField();
        add(textField_1);
        textField_1.setColumns(10);
        
        JButton btnLogin = new JButton("Login");
        btnLogin.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent arg0) {
                role = 1;
            }
        });
        add(btnLogin);
        
        comboBox = new JComboBox();
        add(comboBox);
        
        table = new JTable();
        add(table);
    }
    
    public int getRole(){
        return role;
    }
    
            
}